package com.jt.service.impl;

import com.jt.mapper.TeacherMapper;
import com.jt.pojo.Teacher;
import com.jt.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private TeacherMapper mapper;
    @Override
    public List<Teacher> selectAll(Teacher teacher) {
        return mapper.selectAll(teacher);
    }

    @Override
    public void addTeacher(Teacher teacher) {
         mapper.insert(teacher);
    }
    @Override
    public void updateTeacher(Teacher teacher) {
        mapper.updateById(teacher);
    }
/*    @Override
    public void deleteTeacher(Integer tNo) {
        mapper.deleteById(tNo);
    }*/
}
